import request from '@/utils/request'

const baseUrl = '/prot/product'

export function getProductPage(params) {
  return request({
    url: `${baseUrl}/getAll/${params.pageNum}/${params.pageSize}`,
    method: 'get'
  })
}

export function getAllProduct() {
  return request({
    url: `${baseUrl}/getAll/1/200`,
    method: 'get'
  })
}

export function getProductById(id) {
  return request({
    url: `${baseUrl}/getById/${id}`,
    method: 'get'
  })
}

export function getProductPages(params) {
  return request({
    url: `${baseUrl}/queryPage`,
    method: 'get',
    params: params
  })
}
